﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//using DataSyn.Util;

namespace ConsoleOldToNew
{
    class SendInfo
    {
        /// <summary>
        /// 获取212协议发送的信息
        /// </summary>
        /// <param name="strSendData"></param>
        /// <returns></returns>
        public static string GetSendInfo(string strSendData)
        {
            string strHead = "##";//包头

        //    string strQN = DateTime.Now.ToString("yyyyMMddHHmmssfff");

          //  string strDataLength = strSendData.Length.ToString().PadLeft(4, '0');//数据长度
            string strCRC = CrcCheck.GetCRC16(strSendData);
           
            string strSendInfo = strHead + strSendData + strCRC;
            string strEnd = "\r\n";//包尾
            strSendInfo = strSendInfo + strEnd;//2014-10-06严加
         
            return strSendInfo;
        }
    }
}
